<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:p="http://primefaces.org/ui"
        locale="#{loginBean.locale}" >
    <html>
        <h:head>
            <meta charset="UTF-8" />
            <title>#{i18n.gch_app_principal}</title>
            <link href="#{facesContext.externalContext.requestContextPath}/css/reset.css" type="text/css" rel="stylesheet" />
            <link href="#{facesContext.externalContext.requestContextPath}/css/default.css" type="text/css" rel="stylesheet" />
            <style type="text/css"> .ancho { width: 250px; } </style>
        </h:head>
        <h:body>
            <header>
                <div>  
                    <h:form style="padding: 0em ; border:none">
                        <h:commandLink  action="#{loginBean.gch_lenguaje('en')}" styleClass="urls" style="right :120px" value="English" />
                        <h:commandLink  action="#{loginBean.gch_lenguaje('es')}" styleClass="urls" value="Español" />
                    </h:form>
                </div>
                <hgroup>
                    <h1>GCH</h1>
                    <h2>#{i18n.gch_app_principal}</h2>
                </hgroup>

                <!-- menu -->
                <ui:insert name="menu">
                    <ui:include src="/view/plantilla/menu.xhtml"/>
                </ui:insert>
                <!-- fin menu -->

                <div>
                    <h:form style="padding: 0em ; border:none">
                        <h:commandLink  action="#{loginBean.acceso}" styleClass="urls" value="#{i18n.gch_app_iniciar_sesion}" rendered="#{loginBean.GCH_SESSION == null}" />
                        <h:commandLink  action="#{loginBean.logout}" styleClass="urls" value="#{i18n.gch_app_cerrar_sesion}" rendered="#{loginBean.GCH_SESSION != null}" />
                    </h:form>
                </div>
            </header>
            <!-- ayuda -->
            <ui:insert name="ayuda">
                <ui:include src="/view/plantilla/ayuda.xhtml"/>
            </ui:insert>
            <!-- fin ayuda -->
            <section id="contenido">
                <div>
                    <!-- cuerpo -->
                    <ui:insert name="cuerpo">
                        <ui:include src="/view/plantilla/cuerpo.xhtml"/>
                    </ui:insert>
                    <!-- fin cuerpo -->
                </div>
            </section>
            <!-- pie -->
            <ui:insert name="pie">
                <ui:include src="/view/plantilla/pie.xhtml"/>
            </ui:insert>
            <!-- fin pie -->
        </h:body>
    </html>
</f:view>

